#include<stdlib.h>
#include<assert.h>
#include<iostream>
#include<math.h>
using namespace std;
typedef int Datatype;
typedef struct Heap
{
	Datatype* Data;
	int size;
	int capacity;
}HP;
void HeapInit(HP* php);
void Heappush(HP* php, Datatype x);
void Print(HP* Heap);
void Pop(HP* pho);
void adjustdown(Datatype* a, int n, int parent);
bool HeapEmpty(HP* php);
int HeapSize(HP* php);
Datatype HeapTop(HP* php);
void Destroy(HP* php);
void HeapSort(int* a, int n);
void Swap(Datatype& p1, Datatype& p2);
